package letsjava.socket;

import java.net.InetAddress;
import java.net.UnknownHostException;

public class InetAddressTest {
	public static void main(String[] args) throws UnknownHostException{
		InetAddress[] address =  InetAddress.getAllByName("baidu.com");
		for(InetAddress s : address){
			System.out.println(s);
		}
		System.out.println(InetAddress.getLocalHost());
	}
}
